const express = require("express");
const path = require("path");
let app = express();

app.get("/", (req, res) => {
  // 加载index.html页面
  res.sendFile(path.join(__dirname, "./views/index.html"));
})

app.get("/get", (req, res) => {
  // get请求
  res.json(req.query);
})

app.listen(8080);